<template>
    <div class="nest">
        <h1>这是第二层</h1>
        {{data}}
        <A />
    </div>
</template>

<script setup lang="ts">
import A from './A.vue'
import {inject} from 'vue'
let data = inject('flag')

</script>

<style scoped>
.nest {
    width: 250px;
    height: 250px;
    padding: 10px;
    background-color: goldenrod;
    color: white;
}
</style>